﻿<%@ Page Language="C#" MasterPageFile="~/Admin/AdminMaster.Master" AutoEventWireup="true" CodeFile="ArticleEdit2.aspx.cs" Inherits="PeachLite.Admin.ArticleEdit2" %>
<asp:Content ID="c1" ClientIDMode="Static" runat="server" ContentPlaceHolderID="cphHead">
    <script type="text/javascript" src="js/dtpk/WdatePicker.js"></script>
    <link type="text/css" rel="Stylesheet" href="js/kindeditor/themes/default/default.css" charset="utf-8" />
    <link rel="stylesheet" href="js/kindeditor/plugins/code/prettify.css" />
    <script type="text/javascript" src="js/aedit.js" charset="utf-8"></script>
    <script type="text/javascript" src="js/kindeditor/kindeditor-min.js" charset="utf-8"></script>
    <script type="text/javascript" src="js/kindeditor/lang/zh_CN.js" charset="urf-8"></script>
    <script type="text/javascript" src="js/ajaxfileupload.js"></script>
    <script type="text/javascript" src="js/validation/jquery.validation.min.js"></script>
    <link type="text/css" rel="Stylesheet" href="js/validation/common.css" />
    <link type="text/css" rel="Stylesheet" href="js/validation/semantic.css" />
    <link type="text/css" rel="Stylesheet" href="resx/fimanger.css" />
    <script type="text/javascript" src="js/fimanger.js"></script>
    <style type="text/css">
       .ke-toolbar-icon.ke-toolbar-icon-url.ke-icon-filex {
	        background: url("resx/img/pic3.png") center center;
	        width: 16px;
	        height: 16px;
        }
    </style>
    <script type="text/javascript">
        KindEditor.ready(function (K) {
            var editor1 = K.create('#contentx', {
                cssPath: 'js/kindeditor/plugins/code/prettify.css',
                allowFileManager: true,
                uploadJson: 'x/fileuploader.ashx',
                fileManagerJson: 'x/filemanager.ashx',
                afterBlur: function () { this.sync(); },
                items: ['source', '|', 'undo', 'redo', '|', 'preview', 'print', 'template', 'code', 'cut', 'copy', 'paste',
                    'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
                    'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
                    'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen', '/',
                    'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
                    'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'filex', 'image', 'multiimage',
                    'flash', 'media', 'insertfile', 'table', 'hr', 'emoticons', 'baidumap', 'pagebreak',
                    'anchor', 'link', 'unlink', '|', 'about']
            });
            //            prettyPrint();
        });

        $(function () {
            $('#form-signin_v3').validate({
                submit: {
                    settings: {
                        clear: "keypress",
                        button: '#submit-signin_v3',
                        errorClass: 'custom-error',
                        errorListClass: 'custom-error-list',
                        inputContainer: 'dl',
                        trigger: ["click"],
                        scrollToError: {
                            offset: -100,
                            duration: 500,
                            blabla: 123
                        }
                    },
                    callback: {
                        onSubmit: save
                    }
                }
            });

        });

       
    </script>
</asp:Content>
<asp:Content ID="c2" ClientIDMode="Static" runat="server" ContentPlaceHolderID="cphMain">
    <%--<div class="fimanger blue" id="fiManger">
        <div class="hd clearfix ">
            <span class="tit" id="fmTitle">文件管理</span> 
            <span class="close" onclick="FileManger.close();">×</span>
        </div>
        <div class="bd">
            <ul class="tnav clearfix" id="fitpnav">
                <li nid="locFile" class="cur"><span>本地资源</span></li>
           </ul>
        <div class="main">
            <ul class="tabl clearfix" id="locFile" style="display: block;">
                <li>
                    <div class="t">选择文件：</div>
                    <div class="d">
                        <div class="ficont"><a class="fibtn" onclick="FileManger.openFiView();">浏览...</a>
                            <input type="file" name="fiUploader" id="fiUploader" onchange="FileManger.getLocFileName();"/>
                        </div>
                        <ul class="addrs clearfix" id="fiAddrList">
                            <li><span>c:/yayao.cn</span><b class="iconfont">&#xf00c;</b></li>
                            <li><span>c:/yayao.cn</span><b class="iconfont">&#xf00c;</b></li>
                            <li><span>c:/yayao.cn</span><b class="iconfont">&#xf00c;</b></li>
                        </ul>
                    </div>
                </li>
                
                </ul></div></div><div class="bm"><a class="fibtn" onclick="FileManger.close();">取消</a> <a class="fibtn" id="fiConfirm" mod="locFile" onclick="FileManger.confirmSelection();">选择</a></div></div>--%>
    <div class="box box1">
        <div class="hd">
            <div class="tit">
                <i class="iconfont">&#xf044;</i> <span>文章编辑</span>
            </div>
        </div>
        <div class="bd aedit ui" id="form-signin_v3">
            <!-- 导航栏-->
            <ul class="fnav" id="fnav">
                <li class="cur" rid="bdesc">
                    <span>基本信息</span>
                </li>
                <li rid="rdesc">
                    <span>相关图片</span>
                </li>
            </ul>
            <!-- 基本信息 -->
            <ul class="fm fm1 clearfix" id="bdesc">
                <li class="l">
                <dl>
                    <dt ><label for="signin_v3-username">文章标题：</label></dt>
                    <dd class="ui" style="width:100%;" >
                        <input type="hidden" id="aid" value='<asp:Literal ID="AID" runat="server" ClientIDMode="Static"></asp:Literal>' />
                        <input id="atitle" name="signin_v3[文章标题]" type="text" class="txt" value='<asp:Literal ID="ATitle" runat="server" ClientIDMode="Static"></asp:Literal>' data-validation="[L>=0]" data-validation-message="$ 不能为空." data-validation-regex="/admin/i" data-validation-regex-message="The word &quot;Admin&quot; is not allowed in the $"/>
                    </dd>
                </dl>
            </li>

                <li class="r">
                    <dl>
                        <dt>副标题：</dt>
                        <dd>
                            <input class="txt" type="text" placeholder="副标题" id="titSub" value='<asp:Literal ID="TitleSub" runat="server" ClientIDMode="Static"></asp:Literal>' />
                        </dd>
                    </dl>
                </li>
                <li class="l">
                    <dl>
                        <dt>所属栏目：</dt>
                        <dd>
                            <select class="selt" id="cid" cid='<asp:Literal ID="CID" runat="server" ClientIDMode="Static"></asp:Literal>' >
                                <asp:Literal ID="lt0" runat="server" ClientIDMode="Static"></asp:Literal>
                            </select>
                        </dd>
                    </dl>
                </li>
                <li class="r">
                    <dl>
                        <dt>序号：</dt>
                        <dd>
                            <select id="ordinal" class="selt" oid='<asp:Literal ID="Ordinal" runat="server" ClientIDMode="Static"></asp:Literal>'>
                                <option class="1">1</option>
                                <option class="2">2</option>
                                <option class="3">3</option>
                                <option class="4">4</option>
                                <option class="5">5</option>
                                <option class="6">6</option>
                                <option class="7">7</option>
                                <option class="8">8</option>
                                <option class="9">9</option>
                                <option class="10">10</option>
                                <option class="1">11</option>
                                <option class="2">12</option>
                                <option class="3">13</option>
                                <option class="4">14</option>
                                <option class="5">15</option>
                                <option class="6">16</option>
                                <option class="7">17</option>
                                <option class="8">18</option>
                                <option class="9">19</option>
                                <option class="10">20</option>
                            </select>
                        </dd>
                    </dl>
                </li>
                <li class="l">
                    <dl>
                        <dt>作者：</dt>
                        <dd>
                            <input class="txt" type="text" placeholder="作者" id="author" value='<asp:Literal ID="Author" runat="server" ClientIDMode="Static"></asp:Literal>'/>
                        </dd> 
                    </dl>
                </li>
                <li class="r">
                    <dl>
                        <dt>来源：</dt>
                        <dd>
                            <input class="txt" type="text" placeholder="来源" id="source" value='<asp:Literal ID="Source" runat="server" ClientIDMode="Static"></asp:Literal>'/>
                        </dd>
                    </dl>
                </li>
                <li class="l">
                    <dl>
                        <dt>创作时间：</dt>
                        <dd>
                            <input class="txt" type="text" placeholder="创作时间" id="ctime"  autocomplete="off" value='<asp:Literal ID="CreateTime" runat="server" ClientIDMode="Static"></asp:Literal>' onclick="WdatePicker({dateFmt:&#39;yyyy-MM-dd HH:mm:ss&#39;,readOnly:true});"/>
                        </dd>
                    </dl>
                </li>
                <li class="r">
                    <dl>
                        <dt>链接：</dt>
                        <dd>
                            <input class="txt" type="text" placeholder="跳转地址" id="rdurl" value='<asp:Literal ID="RedirectUrl" runat="server" ClientIDMode="Static"></asp:Literal>'/>
                        </dd>
                    </dl>
                </li>
                <li >
                    <dl>
                        <dt>标题图片：</dt>
                        <dd>
                            <div class="fbtn">
                                <input type="button" value="选择图片" onclick="FileManger.open({skin:'blue',filter:['jpg','jpeg','png','gif','bmp'],dest:'#titImg',savePath:'/u/image'});" />
                            </div>
                            <img src='<asp:Literal ID="TitleImage" runat="server" ClientIDMode="Static"></asp:Literal>' title="" alt="" id="titImg"/>
                        </dd>
                    </dl>
                </li>
                <li>
                    <dl>
                        <dt>关键字：</dt>
                        <dd>
                            <textarea class="area" placeholder="关键字" id="key"><asp:Literal ID="Keyword" runat="server" ClientIDMode="Static"></asp:Literal></textarea>
                        </dd>
                    </dl>
                </li>
                <li>
                    <dl>
                        <dt>描述信息：</dt>
                        <dd>
                            <textarea class="area sm" placeholder="描述信息" id="desc"><asp:Literal ID="Description" runat="server" ClientIDMode="Static"></asp:Literal></textarea>
                        </dd>
                    </dl>
                </li>
                <li>
                    <dl>
                        <dt>文章摘要：</dt>
                        <dd>
                            <textarea class="area" placeholder="文章摘要" id="summary"><asp:Literal ID="Summary" runat="server" ClientIDMode="Static"></asp:Literal></textarea>
                        </dd>
                    </dl>
                </li>
                <li>
                    <dl>
                        <dt>文章内容：</dt>
                        <dd>
                            <textarea cols="100" name="contentx" id='contentx'  style="width: 100%; height: 200px; visibility: hidden;"><asp:Literal ID="AContent" runat="server" ClientIDMode="Static"></asp:Literal></textarea>
                        </dd>
                    </dl>
                </li>
            </ul>
            <!--相关图片-->
            <ul class="fm fm1 clearfix" id="rdesc" style="display:none;" >
                <li>
                    <dl>
                        <dt>图片列表：</dt>
                        <dd>
                            <ul class="rel clearfix" id="rplist" state="0">
                                <asp:Literal ID="lt1" runat="server" ClientIDMode="Static"></asp:Literal>

                                <!-- 图片编辑窗模板 -->
                                <li class="ebox" id="eboxtemp" style="display:none;">
                                    <ul class="fm clearfix">
                                        <li>
                                            <dl>
                                                <dt>图片：</dt>
                                                <dd>
                                                    <div class="fbtn">
                                                        <input type="hidden" class="pid" value="" />
                                                        <input type="button" value="选择图片"onclick="FileManger.open({skin:'blue',filter:['jpg','jpeg','png','gif','bmp'],dest:'#ebox .psrc',savePath:'/u/image'});"/>
                                                    </div>
                                                    <img src="resx/img/none_80.jpg" title="" alt="" class="psrc" />
                                                </dd>
                                            </dl>
                                        </li>
                                        <li class="l">
                                            <dl>
                                                <dt>标题：</dt>
                                                <dd>
                                                    <input type="text" class="txt ptit" />
                                                </dd>
                                            </dl>
                                        </li>
                                        <li class="r">
                                            <dl>
                                                <dt>序号：</dt>
                                                <dd>
                                                    <%--<input type="text" class="txt pod" />--%>
                                                    <select class="selt pod" pod="">
                                                        <option class="1">1</option>
                                                        <option class="2">2</option>
                                                        <option class="3">3</option>
                                                        <option class="4">4</option>
                                                        <option class="5">5</option>
                                                        <option class="6">6</option>
                                                        <option class="7">7</option>
                                                        <option class="8">8</option>
                                                        <option class="9">9</option>
                                                        <option class="10">10</option>
                                                        <option class="1">11</option>
                                                        <option class="2">12</option>
                                                        <option class="3">13</option>
                                                        <option class="4">14</option>
                                                        <option class="5">15</option>
                                                        <option class="6">16</option>
                                                        <option class="7">17</option>
                                                        <option class="8">18</option>
                                                        <option class="9">19</option>
                                                        <option class="10">20</option>
                                                    </select>
                                                </dd>
                                            </dl>
                                        </li>
                                        <li>
                                            <dl>
                                                <dt>描述：</dt>
                                                <dd>
                                                    <textarea class="area pdes"></textarea>
                                                </dd>
                                            </dl>
                                        </li>
                                        <li>
                                            <dl>
                                                <dt>&nbsp;</dt>
                                                <dd class="op clearfix">
                                                    <input type="button" class="btn btn5" value="关闭" onclick="closeEditor();" />
                                                    <input type="button" class="btn btn1" value="保存" onclick="saveimg();" />
                                                </dd>
                                            </dl>
                                        </li>
                                    </ul>
                                </li>
                            </ul>
                        </dd>
                    </dl>
                </li>
            </ul>
            <!--底部操作按钮区-->
            <div class="operate clearfix">
                <a class="btn btn1"  id="submit-signin_v3">保存</a>
                <a class="btn btn2" href="articlelist.aspx" >返回</a>
                <a class="btn btn4" id="newpic" style="display:none;" onclick="openEditor();" >添加图片</a>
            </div>
        </div>
    </div>
</asp:Content>
